package com.cwt.admin.manage;

import com.cwt.admin.common.BaseController;
import com.cwt.common.result.AjaxResult;
import com.cwt.service.service.SysUserService;
import com.cwt.service.vo.Login;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.validation.Valid;

/**
 * @author chenwt
 * @version V1.0
 * @describe 【】
 * @date 2023年08月11日 15:36:13
 */
@Api(tags = "管理端登录注册", value = "ManageLoginController")
@RequestMapping("/manage")
@RestController
public class ManageLoginController extends BaseController {

    @Autowired
    private SysUserService userService;

    @ApiOperation(value = "登录", protocols = "http", httpMethod = "POST")
    @PostMapping("/login")
    public @ResponseBody AjaxResult login(@RequestBody Login login) {
        return userService.login(login, "manage"); // cloud: 123456
    }

}
